﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using businessLevel;

namespace StudyApplication
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void CalculateButton_Click(object sender, EventArgs e)
        {
            string[] allTextScores = ScoresTextbox.Text.Split(',');
            List<int> allIntScores = new List<int>();
            foreach (string elem in allTextScores)
            {
                allIntScores.Add(Convert.ToInt32(elem));
            }
            //string allTextScores = Convert.ToInt32(ScoresTextbox.Text);
            //int i = Convert.ToInt32(ScoresTextbox.Text);
            //List<int> scores=new List<int>();
            //scores.Add(i);
            Pupils student1 = new Pupils("John", "Vasilevich", "Pupkin", "ITM", "100", false);
            ResultLabel.Text = student1.CalculateScores(allIntScores).ToString();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            
        }
    }
}
